<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap.min.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/cart.css"/>
<!--[if lte IE 6]>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/bootstrap-ie6.css">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/ie.css">
<![endif]-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/assets/css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/perfect-scrollbar.min.css"/>

<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__APP__/Application/{$Think.MODULE_NAME}/Public/js/shopping.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/requestAnimationFrame.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/perfect-mousewheel.min.js"></script>

<div id="cart_area" >
    <form action="{:U('Cart/confirm')}" method="POST"  name="form_cart">
        <div class="shop-cart" data-url="{:U('Cart/addToCart')}" 
             data-url-add="{:U('Cart/addCut')}" data-url-empty="{:U('Cart/emptyCart')}" data-sid="{$detail.sid}" data-del="{:U('Cart/addCut')}">
            <div class="shop-bar">
                <div class="close-bar" title="收起购物车">
                    <span class="close-cart" onclick="toggleCartBox($('.cart-bar'))">×</span>
                </div>
                <div class="cart-bar" onclick="toggleCartBox($(this))">
                    <div class="div-plus">
                        <span class="icon-add">+</span>
                    </div> <i class="icon-shopping-cart cart-img"></i>
                    <div class="cart-text">购物车</div>
                    <div class="cart-num badge" id="cart-num">{$cart_num}</div>
                </div>
            </div>
            <div class="cart-list">
                <div class="list-top">
                    <label>
                        <input class="check-all check_cart" type="checkbox" checked onclick="check_cart($(this))" autocomplete="off"/>
                        <span class="check-text">全选</span>
                    </label>
                </div>
                <!-- 购物车清单 -->
                <div id="cart_lists">
                    <foreach name="cartsArr" item="row">
                        <div class="div-list" data-sid="{$row.id}" id="shop_{$row.id}">
                            <div class="shop-header">
                                <div class="shop-check">
                                    <input class="shop-input check_shop"  type="checkbox" checked value="{$row.id}"  onclick="check_shop($(this))" autocomplete="off"></div>
                                <div class="shop-title">
                                    <span class="label label-danger tt">{$row.name}</span>
                                    <strong class="shop-price">{$row.shop_price}</strong>
                                </div>
                            </div>
                            <foreach name="row['sub']" item="row2">
                                <div class="div-article" data-id="{$row2['id']}" data-price="{$row2.price}">
                                    <div class="article-check">
                                        <input class="article-input check_goods" name="id[]" autocomplete="off" onclick="check_goods($(this))" data-pay="{$row2.price}" value="{$row2.id}" type="checkbox" checked></div>

                                    <div class="article-detail">
                                        <p title="{$row2.name}">{$row2.name}</p>
                                    </div>
                                    <div class="article-num" data-total="{$row.othernum}">
                                        <a  class="article-minus" hidefocus="true" onclick="cart_goods_minus($(this))"> 
                                            <i class="icon-minus-sign"></i>
                                        </a>
                                        <input name="num[]" value="{$row2.num}" id="num_{$row2.id}" autocomplete="off" class="article-quantity" />
                                        <a href="javascript:void(0)" class="article-plus" hidefocus="true" onclick="cart_goods_plus($(this))">
                                            <i class="icon-plus-sign"></i>
                                        </a>
                                    </div>
                                    <div class="article-cost">
                                        <a onclick="cart_goods_del($(this))" class="article-del" title="删除" data-tmc="del" onclick="cart_goods_del($(this))">
                                            <i class="icon-remove-circle"></i>
                                        </a> 
                                        <strong class="span-price">{$row2.price}</strong>
                                    </div>
                                    <div class="cl"></div>
                                </div>
                            </foreach>
                        </div>
                    </foreach>
                </div>
                <div class="handel-bottom"></div>
                <div class="list-bottom">
                    <div class="shop-total">
                        <h3>
                            <span class="">已选</span>
                            <strong class="has-checked">{$cart_num}</strong>
                            <span class="">份</span>
                        </h3>
                        <span class="total-money">
                            <span class="">¥</span>
                            <strong class="money-num"id="total_price_cart">{$total_price}</strong>
                        </span>
                    </div>
                    <div class="div-pay">
                        <button type="button" class="btn btn-danger btn-pay" data-href="{:U('Goods/payorder')}" onclick="btn_cart_submit()">
                            结 算&nbsp;
                            <i class="icon-legal"></i>
                        </button>
                    </div>
                </div>
            </div>
            <div class="cl"></div>
        </div>
    </form>
</div>
<input type="hidden" id="shop_info" data-id="{$Think.get.id}" data-name="{$detail.name}">

<div id="element" class="element badge"></div>
